using System.Diagnostics.CodeAnalysis;

namespace Bookvar.ObjectModel.Actions
{
    ///<summary>
    /// A stub action that does nothing :)
    /// Use the static <see cref="Value"/> property because no more than one instance is needed.
    ///</summary>
    public sealed class DoNothingAction : ActionBase
    {
        [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")]
        public static readonly DoNothingAction Value = new DoNothingAction();

        private DoNothingAction()
        {
        }

        public override bool CanRedo
        {
            get { return true; }
        }

        public override bool CanUndo
        {
            get { return true; }
        }

        public override void Execute()
        {
        }

        public override void Undo()
        {
        }
    }
}